package com.wk.worksetter.db

import android.graphics.drawable.Drawable
import androidx.room.Entity
import androidx.room.Ignore
import androidx.room.PrimaryKey

/**
 * @author peng
 * @date 2021/1/28
 * 说明
 */

@Entity(tableName = "works")
data class WorkEntity(
    @PrimaryKey(autoGenerate = true)
    var id:Long? = null,
    var packageName:String = "", //要启动的应用的包名
    var packageLabel:String = "",//app名称
    var oneTimeStartTime:Long = 0,//单次启动的话，启动时间
    var multiStartTimeGap:Long = 0,//定期启动的话，时间间隔
    var workType:Int = WORKTYPE_ONETIME,
    var running :Boolean = false,
    var updateTime:Long = 0,//更新或者创建时间
    @Ignore
    var icon:Drawable? = null//app图标
){
    companion object{
        const val WORKTYPE_ONETIME = 1
        const val WORKTYPE_MULTI = 2
    }
}
